﻿using Bussiness.Interface;
using Bussiness.Service;
using Common.Model;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    public List<Orders> orders = new List<Orders>();
    public IBaseService baseService = new BaseService();
    Users user = new Users();
    protected void Page_Load(object sender, EventArgs e)
    {
        user = (Users)Session["user"];
        if (!IsPostBack)
        {
            Result<List<Orders>> list = new Result<List<Orders>>();
            list = baseService.Select<Orders>(p=>p.UserID==user.UserID);
            if (list.Data != null)
            {
                try
                {
                    orders = list.Data.ToList();

                }
                catch (Exception ex)
                {
                    orders = null;
                }
            }
        }
    }
}